package com.heima.yuanz;

import java.util.concurrent.atomic.AtomicInteger;

public class BingJiLing implements Runnable{
    AtomicInteger ato=new AtomicInteger(0);
    @Override
    public void run() {
        for (int i = 0; i < 100; i++) {
            int count = ato.incrementAndGet();
            System.out.println("已经获取了"+count+"个冰激凌");

        }

    }
}
